from django.shortcuts import render_to_response
from django.template import RequestContext
from eve_api.models.server import ApiServerManager
import datetime

SERVER_MANAGER = ApiServerManager()

def index(request):
	server = SERVER_MANAGER.get_status()
	server.set_api_last_updated()
	context = {
		'server' : server,
	}
	return render_to_response(
		'index.html', 
		context,
		context_instance=RequestContext(request)
		)
	
	
#View for design standarts	
def design(request):
	server = SERVER_MANAGER.get_status()
	server.set_api_last_updated()
	context = {
		'server' : server,
	}
	return render_to_response(
	'design.html', 
	context, 
	context_instance=RequestContext(request)
	)
			
